/*
 * BSM6.0
 *
 * Copyright 2012-2013 (C) SINODATA CO., LTD. All Rights Reserved.
 */
package com.sinodata.bsm.itip.finder;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.List;
import java.util.Map;

import com.sinodata.bsm.itip.util.DB2ConnectionUtil;

/**
 * <p>
 * Description: Tivoli主机的发现类
 * </p>
 *
 * @author wangyazhou
 * @version 1.0

 * <p>
 * History: 
 *
 * Date                     Author         Version     Description
 * ---------------------------------------------------------------------------------
 * 2012-7-31 上午11:30:01          wangyazhou        1.0         To create
 * </p>
 *
 * @since 
 * @see     
 */
public class WindowsFinder extends Finder {

    @SuppressWarnings("rawtypes")
    @Override
    public List<String[]> find(String ip, Map params) {
        Connection conn = null;
        Statement statement = null;
        ResultSet result = null;
        try {
            conn = DB2ConnectionUtil.getInstance().getConnection();
            statement = conn.createStatement();
            result = statement.executeQuery("select * from ITMUSER.UTF8TEST");
            while (result.next()) {
                System.out.println(result.getString(1));
            }
        } catch (Exception e) {
            logger.error(e);
        } finally {
            try {

                statement.close();
                DB2ConnectionUtil.getInstance().returnConn(conn);

            } catch (Exception e2) {
            }
        }

        return null;
    }

}
